<!doctype html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>jQuery UI accordion documentation</title>

	<style>
	body {
		font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif"
	}
	.gutter {
		display: none;
	}
	</style>
</head>
<body>

<script>{
		"title":
			"Accordion Widget",
		"excerpt":
			"Convert a pair of headers and content panels into an accordion.",
		"termSlugs": {
			"category": [
				"widgets"
			]
		}
	}</script><article id="accordion1" class="entry widget"><h2 class="section-title">
<span>Accordion Widget</span><span class="version-details">version added: 1.0</span>
</h2>
<div class="entry-wrapper">
<p class="desc"><strong>Description: </strong>Convert a pair of headers and content panels into an accordion.</p>
<section id="quick-nav"><header><h2>QuickNav<a href="#entry-examples">Examples</a>
</h2></header><div class="quick-nav-section">
<h3>Options</h3>
<div><a href="#option-active">active</a></div>
<div><a href="#option-animate">animate</a></div>
<div><a href="#option-collapsible">collapsible</a></div>
<div><a href="#option-disabled">disabled</a></div>
<div><a href="#option-event">event</a></div>
<div><a href="#option-header">header</a></div>
<div><a href="#option-heightStyle">heightStyle</a></div>
<div><a href="#option-icons">icons</a></div>
</div>
<div class="quick-nav-section">
<h3>Methods</h3>
<div><a href="#method-destroy">destroy</a></div>
<div><a href="#method-disable">disable</a></div>
<div><a href="#method-enable">enable</a></div>
<div><a href="#method-option">option</a></div>
<div><a href="#method-refresh">refresh</a></div>
<div><a href="#method-widget">widget</a></div>
</div>
<div class="quick-nav-section">
<h3>Events</h3>
<div><a href="#event-activate">activate</a></div>
<div><a href="#event-beforeActivate">beforeActivate</a></div>
<div><a href="#event-create">create</a></div>
</div></section><div class="longdesc" id="entry-longdesc">
		<p>The markup of your accordion container needs pairs of headers and content panels:</p>

		<div class="syntaxhighlighter xml">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
						<div class="line n4">4</div>
					
						<div class="line n5">5</div>
					
						<div class="line n6">6</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code><span class="tag">&lt;<span class="title">div</span> <span class="attribute">id</span>=<span class="value">&quot;accordion&quot;</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">h3</span>&gt;</span>First header<span class="tag">&lt;/<span class="title">h3</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">div</span>&gt;</span>First content panel<span class="tag">&lt;/<span class="title">div</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">h3</span>&gt;</span>Second header<span class="tag">&lt;/<span class="title">h3</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">div</span>&gt;</span>Second content panel<span class="tag">&lt;/<span class="title">div</span>&gt;</span></code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;/<span class="title">div</span>&gt;</span></code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>


		<p>Accordions support arbitrary markup, but each content panel must always be the next sibling after its associated header. See the <a href="#option-header"><code>header</code></a> option for information on how to use custom markup structures.</p>
		<p>The panels can be activated programmatically by setting the <a href="#option-active"><code>active</code></a> option.</p>

		<h3>Keyboard interaction</h3>

		<p>When focus is on a header, the following key commands are available:</p>
		<ul>
			<li>UP/LEFT - Move focus to the previous header. If on first header, moves focus to last header.</li>
			<li>DOWN/RIGHT - Move focus to the next header. If on last header, moves focus to first header.</li>
			<li>HOME - Move focus to the first header.</li>
			<li>END - Move focus to the last header.</li>
			<li>SPACE/ENTER - Activate panel associated with focused header.</li>
		</ul>

		<p>When focus is in a panel:</p>
		<ul>
			<li>CTRL+UP: Move focus to associated header.</li>
		</ul>

		<h3>Dependencies</h3>
		<ul>
			<li><a href="/category/ui-core/">UI Core</a></li>
			<li><a href="/jQuery.widget/">Widget Factory</a></li>
			<li>
<a href="/category/effects-core/">Effects Core</a> (optional; for use with the <a href="#option-animate"><code>animate</code></a> option)</li>
		</ul>
	</div>
<h3>Additional Notes:</h3>
<div class="longdesc"><ul><li>
			This widget requires some functional CSS, otherwise it won&apos;t work. If you build a custom theme, use the widget&apos;s specific CSS file as a starting point.
		</li></ul></div>
<section id="options"><header><h2>Options</h2></header><div id="option-active" class="api-item first-item">
<h3>active&#xA0;
					</h3>
<div class="option-type">
<strong>Type: </strong><a href="http://api.jquery.com/Types/#Boolean">Boolean</a> or <a href="http://api.jquery.com/Types/#Integer">Integer</a>
</div>
<div class="default">
<strong>Default: </strong><code>0</code>
</div>
<div>
				Which panel is currently open.
			</div>
<strong>Multiple types supported:</strong><ul>
<li>
<strong>Boolean</strong>: Setting <code>active</code> to <code>false</code> will collapse all panels. This requires the <a href="#option-collapsible"><code>collapsible</code></a> option to be <code>true</code>.</li>
<li>
<strong>Integer</strong>: The zero-based index of the panel that is active (open). A negative value selects panels going backward from the last panel.</li>
</ul>
<strong>Code examples:</strong><p>Initialize the accordion with the <code>active</code> option specified:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion({</code></div></div><div class="container"><div class="line"><code>  active: <span class="number">2</span></code></div></div><div class="container"><div class="line"><code>});</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<p>Get or set the <code>active</code> option, after initialization:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
						<div class="line n4">4</div>
					
						<div class="line n5">5</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code><span class="comment">// Getter</span></code></div></div><div class="container"><div class="line"><code><span class="keyword">var</span> active = $( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;active&quot;</span> );</code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="comment">// Setter</span></code></div></div><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;active&quot;</span>, <span class="number">2</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
<div id="option-animate" class="api-item">
<h3>animate&#xA0;
					</h3>
<div class="option-type">
<strong>Type: </strong><a href="http://api.jquery.com/Types/#Boolean">Boolean</a> or <a href="http://api.jquery.com/Types/#Number">Number</a> or <a href="http://api.jquery.com/Types/#String">String</a> or <a href="http://api.jquery.com/Types/#Object">Object</a>
</div>
<div class="default">
<strong>Default: </strong><code>{}</code>
</div>
<div>If and how to animate changing panels.</div>
<strong>Multiple types supported:</strong><ul>
<li>
<strong>Boolean</strong>: A value of <code>false</code> will disable animations.</li>
<li>
<strong>Number</strong>: Duration in milliseconds with default easing.</li>
<li>
<strong>String</strong>: Name of <a href="/easings/">easing</a> to use with default duration.</li>
<li>
<strong>Object</strong>: Animation settings with <code>easing</code> and <code>duration</code> properties.
					<ul>
						<li>Can also contain a <code>down</code> property with any of the above options.</li>
						<li>&quot;Down&quot; animations occur when the panel being activated has a lower index than the currently active panel.</li>
					</ul>
				</li>
</ul>
<strong>Code examples:</strong><p>Initialize the accordion with the <code>animate</code> option specified:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion({</code></div></div><div class="container"><div class="line"><code>  animate: <span class="string">&quot;bounceslide&quot;</span></code></div></div><div class="container"><div class="line"><code>});</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<p>Get or set the <code>animate</code> option, after initialization:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
						<div class="line n4">4</div>
					
						<div class="line n5">5</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code><span class="comment">// Getter</span></code></div></div><div class="container"><div class="line"><code><span class="keyword">var</span> animate = $( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;animate&quot;</span> );</code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="comment">// Setter</span></code></div></div><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;animate&quot;</span>, <span class="string">&quot;bounceslide&quot;</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
<div id="option-collapsible" class="api-item">
<h3>collapsible&#xA0;
					</h3>
<div class="option-type">
<strong>Type: </strong><a href="http://api.jquery.com/Types/#Boolean">Boolean</a>
</div>
<div class="default">
<strong>Default: </strong><code>false</code>
</div>
<div>Whether all the sections can be closed at once. Allows collapsing the active section.</div>
<strong>Code examples:</strong><p>Initialize the accordion with the <code>collapsible</code> option specified:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion({</code></div></div><div class="container"><div class="line"><code>  collapsible: <span class="literal">true</span></code></div></div><div class="container"><div class="line"><code>});</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<p>Get or set the <code>collapsible</code> option, after initialization:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
						<div class="line n4">4</div>
					
						<div class="line n5">5</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code><span class="comment">// Getter</span></code></div></div><div class="container"><div class="line"><code><span class="keyword">var</span> collapsible = $( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;collapsible&quot;</span> );</code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="comment">// Setter</span></code></div></div><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;collapsible&quot;</span>, <span class="literal">true</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
<div id="option-disabled" class="api-item">
<h3>disabled&#xA0;
					</h3>
<div class="option-type">
<strong>Type: </strong><a href="http://api.jquery.com/Types/#Boolean">Boolean</a>
</div>
<div class="default">
<strong>Default: </strong><code>false</code>
</div>
<div>Disables the accordion if set to <code>true</code>.</div>
<strong>Code examples:</strong><p>Initialize the accordion with the <code>disabled</code> option specified:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion({</code></div></div><div class="container"><div class="line"><code>  disabled: <span class="literal">true</span></code></div></div><div class="container"><div class="line"><code>});</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<p>Get or set the <code>disabled</code> option, after initialization:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
						<div class="line n4">4</div>
					
						<div class="line n5">5</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code><span class="comment">// Getter</span></code></div></div><div class="container"><div class="line"><code><span class="keyword">var</span> disabled = $( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;disabled&quot;</span> );</code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="comment">// Setter</span></code></div></div><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;disabled&quot;</span>, <span class="literal">true</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
<div id="option-event" class="api-item">
<h3>event&#xA0;
					</h3>
<div class="option-type">
<strong>Type: </strong><a href="http://api.jquery.com/Types/#String">String</a>
</div>
<div class="default">
<strong>Default: </strong><code>&quot;click&quot;</code>
</div>
<div>The event that accordion headers will react to in order to activate the associated panel. Multiple events can be specificed, separated by a space.</div>
<strong>Code examples:</strong><p>Initialize the accordion with the <code>event</code> option specified:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion({</code></div></div><div class="container"><div class="line"><code>  event: <span class="string">&quot;mouseover&quot;</span></code></div></div><div class="container"><div class="line"><code>});</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<p>Get or set the <code>event</code> option, after initialization:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
						<div class="line n4">4</div>
					
						<div class="line n5">5</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code><span class="comment">// Getter</span></code></div></div><div class="container"><div class="line"><code><span class="keyword">var</span> event = $( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;event&quot;</span> );</code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="comment">// Setter</span></code></div></div><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;event&quot;</span>, <span class="string">&quot;mouseover&quot;</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
<div id="option-header" class="api-item">
<h3>header&#xA0;
					</h3>
<div class="option-type">
<strong>Type: </strong><a href="http://api.jquery.com/Types/#Selector">Selector</a>
</div>
<div class="default">
<strong>Default: </strong><code>&quot;&gt; li &gt; :first-child,&gt; :not(li):even&quot;</code>
</div>
<div>
				<p>Selector for the header element, applied via <code>.find()</code> on the main accordion element. Content panels must be the sibling immedately after their associated headers.</p>
			</div>
<strong>Code examples:</strong><p>Initialize the accordion with the <code>header</code> option specified:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion({</code></div></div><div class="container"><div class="line"><code>  header: <span class="string">&quot;h3&quot;</span></code></div></div><div class="container"><div class="line"><code>});</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<p>Get or set the <code>header</code> option, after initialization:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
						<div class="line n4">4</div>
					
						<div class="line n5">5</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code><span class="comment">// Getter</span></code></div></div><div class="container"><div class="line"><code><span class="keyword">var</span> header = $( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;header&quot;</span> );</code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="comment">// Setter</span></code></div></div><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;header&quot;</span>, <span class="string">&quot;h3&quot;</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
<div id="option-heightStyle" class="api-item">
<h3>heightStyle&#xA0;
					</h3>
<div class="option-type">
<strong>Type: </strong><a href="http://api.jquery.com/Types/#String">String</a>
</div>
<div class="default">
<strong>Default: </strong><code>&quot;auto&quot;</code>
</div>
<div>
				<p>Controls the height of the accordion and each panel. Possible values:</p>
				<ul>
					<li>
<code>&quot;auto&quot;</code>: All panels will be set to the height of the tallest panel.</li>
					<li>
<code>&quot;fill&quot;</code>: Expand to the available height based on the accordion&apos;s parent height.</li>
					<li>
<code>&quot;content&quot;</code>: Each panel will be only as tall as its content.</li>
				</ul>
			</div>
<strong>Code examples:</strong><p>Initialize the accordion with the <code>heightStyle</code> option specified:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion({</code></div></div><div class="container"><div class="line"><code>  heightStyle: <span class="string">&quot;fill&quot;</span></code></div></div><div class="container"><div class="line"><code>});</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<p>Get or set the <code>heightStyle</code> option, after initialization:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
						<div class="line n4">4</div>
					
						<div class="line n5">5</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code><span class="comment">// Getter</span></code></div></div><div class="container"><div class="line"><code><span class="keyword">var</span> heightStyle = $( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;heightStyle&quot;</span> );</code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="comment">// Setter</span></code></div></div><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;heightStyle&quot;</span>, <span class="string">&quot;fill&quot;</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
<div id="option-icons" class="api-item">
<h3>icons&#xA0;
					</h3>
<div class="option-type">
<strong>Type: </strong><a href="http://api.jquery.com/Types/#Object">Object</a>
</div>
<div class="default">
<strong>Default: </strong><code>{ &quot;header&quot;: &quot;ui-icon-triangle-1-e&quot;, &quot;activeHeader&quot;: &quot;ui-icon-triangle-1-s&quot; }</code>
</div>
<div>
				<p>Icons to use for headers, matching an icon defined by the jQuery UI CSS Framework. Set to <code>false</code> to have no icons displayed.</p>
				<ul>
					<li>header (string, default: &quot;ui-icon-triangle-1-e&quot;)</li>
					<li>activeHeader (string, default: &quot;ui-icon-triangle-1-s&quot;)</li>
				</ul>
			</div>
<strong>Code examples:</strong><p>Initialize the accordion with the <code>icons</code> option specified:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion({</code></div></div><div class="container"><div class="line"><code>  icons: { <span class="string">&quot;header&quot;</span>: <span class="string">&quot;ui-icon-plus&quot;</span>, <span class="string">&quot;headerSelected&quot;</span>: <span class="string">&quot;ui-icon-minus&quot;</span> }</code></div></div><div class="container"><div class="line"><code>});</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<p>Get or set the <code>icons</code> option, after initialization:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
						<div class="line n4">4</div>
					
						<div class="line n5">5</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code><span class="comment">// Getter</span></code></div></div><div class="container"><div class="line"><code><span class="keyword">var</span> icons = $( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;icons&quot;</span> );</code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="comment">// Setter</span></code></div></div><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;icons&quot;</span>, { <span class="string">&quot;header&quot;</span>: <span class="string">&quot;ui-icon-plus&quot;</span>, <span class="string">&quot;headerSelected&quot;</span>: <span class="string">&quot;ui-icon-minus&quot;</span> } );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div></section><section id="methods"><header><h2>Methods</h2></header><div id="method-destroy"><div class="api-item first-item">
<h3>destroy()<span class="returns">Returns: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a> (<a href="http://learn.jquery.com/jquery-ui/widget-factory/widget-method-invocation/">plugin only</a>)</span>
</h3>
<div>
		Removes the accordion functionality completely. This will return the element back to its pre-init state.
	</div>
<ul><li><div class="null-signature">This method does not accept any arguments.</div></li></ul>
<div>
<strong>Code examples:</strong><p>Invoke the destroy method:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;destroy&quot;</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
</div></div>
<div id="method-disable"><div class="api-item">
<h3>disable()<span class="returns">Returns: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a> (<a href="http://learn.jquery.com/jquery-ui/widget-factory/widget-method-invocation/">plugin only</a>)</span>
</h3>
<div>
		Disables the accordion.
	</div>
<ul><li><div class="null-signature">This method does not accept any arguments.</div></li></ul>
<div>
<strong>Code examples:</strong><p>Invoke the disable method:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;disable&quot;</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
</div></div>
<div id="method-enable"><div class="api-item">
<h3>enable()<span class="returns">Returns: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a> (<a href="http://learn.jquery.com/jquery-ui/widget-factory/widget-method-invocation/">plugin only</a>)</span>
</h3>
<div>
		Enables the accordion.
	</div>
<ul><li><div class="null-signature">This method does not accept any arguments.</div></li></ul>
<div>
<strong>Code examples:</strong><p>Invoke the enable method:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;enable&quot;</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
</div></div>
<div id="method-option">
<div class="api-item">
<h3>option( optionName )<span class="returns">Returns: <a href="http://api.jquery.com/Types/#Object">Object</a></span>
</h3>
<div>Gets the value currently associated with the specified <code>optionName</code>.</div>
<ul><li>
<div><strong>optionName</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#String">String</a>
</div>
<div>The name of the option to get.</div>
</li></ul>
<div>
<strong>Code examples:</strong><p>Invoke the  method:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code><span class="keyword">var</span> isDisabled = $( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;disabled&quot;</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
</div>
<div class="api-item">
<h3>option()<span class="returns">Returns: <a href="http://api.jquery.com/Types/#PlainObject">PlainObject</a></span>
</h3>
<div>Gets an object containing key/value pairs representing the current accordion options hash.</div>
<ul><li><div class="null-signature">This signature does not accept any arguments.</div></li></ul>
<div>
<strong>Code examples:</strong><p>Invoke the  method:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code><span class="keyword">var</span> options = $( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
</div>
<div class="api-item">
<h3>option( optionName, value )<span class="returns">Returns: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a> (<a href="http://learn.jquery.com/jquery-ui/widget-factory/widget-method-invocation/">plugin only</a>)</span>
</h3>
<div>Sets the value of the accordion option associated with the specified <code>optionName</code>.</div>
<ul>
<li>
<div><strong>optionName</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#String">String</a>
</div>
<div>The name of the option to set.</div>
</li>
<li>
<div><strong>value</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#Object">Object</a>
</div>
<div>A value to set for the option.</div>
</li>
</ul>
<div>
<strong>Code examples:</strong><p>Invoke the  method:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, <span class="string">&quot;disabled&quot;</span>, <span class="literal">true</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
</div>
<div class="api-item">
<h3>option( options )<span class="returns">Returns: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a> (<a href="http://learn.jquery.com/jquery-ui/widget-factory/widget-method-invocation/">plugin only</a>)</span>
</h3>
<div>Sets one or more options for the accordion.</div>
<ul><li>
<div><strong>options</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#Object">Object</a>
</div>
<div>A map of option-value pairs to set.</div>
</li></ul>
<div>
<strong>Code examples:</strong><p>Invoke the  method:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;option&quot;</span>, { disabled: <span class="literal">true</span> } );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
</div>
</div>
<div id="method-refresh"><div class="api-item">
<h3>refresh()<span class="returns">Returns: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a> (<a href="http://learn.jquery.com/jquery-ui/widget-factory/widget-method-invocation/">plugin only</a>)</span>
</h3>
<div>Recompute the height of the accordion panels. Results depend on the content and the <a href="#option-heightStyle"><code>heightStyle</code></a> option.</div>
<ul><li><div class="null-signature">This method does not accept any arguments.</div></li></ul>
<div>
<strong>Code examples:</strong><p>Invoke the refresh method:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;refresh&quot;</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
</div></div>
<div id="method-widget"><div class="api-item">
<h3>widget()<span class="returns">Returns: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a></span>
</h3>
<div>
		Returns a <code>jQuery</code> object containing the accordion.
	</div>
<ul><li><div class="null-signature">This method does not accept any arguments.</div></li></ul>
<div>
<strong>Code examples:</strong><p>Invoke the widget method:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code><span class="keyword">var</span> widget = $( <span class="string">&quot;.selector&quot;</span> ).accordion( <span class="string">&quot;widget&quot;</span> );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
</div></div></section><section id="events"><header><h2>Events</h2></header><div id="event-activate" class="api-item first-item">
<h3>activate( event, ui )<span class="returns">Type: <code>accordionactivate</code></span>
</h3>
<div>Triggered after a panel has been activated (after animation completes). If the accordion was previously collapsed, <code>ui.oldHeader</code> and <code>ui.oldPanel</code> will be empty jQuery objects. If the accordion is collapsing, <code>ui.newHeader</code> and <code>ui.newPanel</code> will be empty jQuery objects.</div>
<ul>
<li>
<div><strong>event</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#Event">Event</a>
</div>
<div></div>
</li>
<li>
<div><strong>ui</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#Object">Object</a>
</div>
<div></div>
<ul>
<li>
<div><strong>newHeader</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a>
</div>
<div>The header that was just activated.</div>
</li>
<li>
<div><strong>oldHeader</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a>
</div>
<div>The header that was just deactivated.</div>
</li>
<li>
<div><strong>newPanel</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a>
</div>
<div>The panel that was just activated.</div>
</li>
<li>
<div><strong>oldPanel</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a>
</div>
<div>The panel that was just deactivated.</div>
</li>
</ul>
</li>
</ul>
<div>
<strong>Code examples:</strong><p>Initialize the accordion with the activate callback specified:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion({</code></div></div><div class="container"><div class="line"><code>  activate: <span class="keyword">function</span>( event, ui ) {}</code></div></div><div class="container"><div class="line"><code>});</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<p>Bind an event listener to the accordionactivate event:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).on( <span class="string">&quot;accordionactivate&quot;</span>, <span class="keyword">function</span>( event, ui ) {} );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
</div>
<div id="event-beforeActivate" class="api-item">
<h3>beforeActivate( event, ui )<span class="returns">Type: <code>accordionbeforeactivate</code></span>
</h3>
<div>Triggered directly before a panel is activated. Can be canceled to prevent the panel from activating. If the accordion is currently collapsed, <code>ui.oldHeader</code> and <code>ui.oldPanel</code> will be empty jQuery objects. If the accordion is collapsing, <code>ui.newHeader</code> and <code>ui.newPanel</code> will be empty jQuery objects.</div>
<ul>
<li>
<div><strong>event</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#Event">Event</a>
</div>
<div></div>
</li>
<li>
<div><strong>ui</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#Object">Object</a>
</div>
<div></div>
<ul>
<li>
<div><strong>newHeader</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a>
</div>
<div>The header that is about to be activated.</div>
</li>
<li>
<div><strong>oldHeader</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a>
</div>
<div>The header that is about to be deactivated.</div>
</li>
<li>
<div><strong>newPanel</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a>
</div>
<div>The panel that is about to be activated.</div>
</li>
<li>
<div><strong>oldPanel</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a>
</div>
<div>The panel that is about to be deactivated.</div>
</li>
</ul>
</li>
</ul>
<div>
<strong>Code examples:</strong><p>Initialize the accordion with the beforeActivate callback specified:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion({</code></div></div><div class="container"><div class="line"><code>  beforeActivate: <span class="keyword">function</span>( event, ui ) {}</code></div></div><div class="container"><div class="line"><code>});</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<p>Bind an event listener to the accordionbeforeactivate event:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).on( <span class="string">&quot;accordionbeforeactivate&quot;</span>, <span class="keyword">function</span>( event, ui ) {} );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
</div>
<div id="event-create" class="api-item">
<h3>create( event, ui )<span class="returns">Type: <code>accordioncreate</code></span>
</h3>
<div>Triggered when the accordion is created. If the accordion is collapsed, <code>ui.header</code> and <code>ui.panel</code> will be empty jQuery objects.</div>
<ul>
<li>
<div><strong>event</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#Event">Event</a>
</div>
<div></div>
</li>
<li>
<div><strong>ui</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#Object">Object</a>
</div>
<div></div>
<ul>
<li>
<div><strong>header</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a>
</div>
<div>The active header.</div>
</li>
<li>
<div><strong>panel</strong></div>
<div>Type: <a href="http://api.jquery.com/Types/#jQuery">jQuery</a>
</div>
<div>The active panel.</div>
</li>
</ul>
</li>
</ul>
<div>
<strong>Code examples:</strong><p>Initialize the accordion with the create callback specified:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).accordion({</code></div></div><div class="container"><div class="line"><code>  create: <span class="keyword">function</span>( event, ui ) {}</code></div></div><div class="container"><div class="line"><code>});</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<p>Bind an event listener to the accordioncreate event:</p>
<div class="syntaxhighlighter javascript">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code>$( <span class="string">&quot;.selector&quot;</span> ).on( <span class="string">&quot;accordioncreate&quot;</span>, <span class="keyword">function</span>( event, ui ) {} );</code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

</div>
</div></section><section class="entry-examples" id="entry-examples"><header><h2>Example:</h2></header><div class="entry-example" id="example-0">
<p>A simple jQuery UI Accordion</p>
<div class="syntaxhighlighter xml">
	<table>
		<tbody>
			<tr>
				
				<td class="gutter">
					
						<div class="line n1">1</div>
					
						<div class="line n2">2</div>
					
						<div class="line n3">3</div>
					
						<div class="line n4">4</div>
					
						<div class="line n5">5</div>
					
						<div class="line n6">6</div>
					
						<div class="line n7">7</div>
					
						<div class="line n8">8</div>
					
						<div class="line n9">9</div>
					
						<div class="line n10">10</div>
					
						<div class="line n11">11</div>
					
						<div class="line n12">12</div>
					
						<div class="line n13">13</div>
					
						<div class="line n14">14</div>
					
						<div class="line n15">15</div>
					
						<div class="line n16">16</div>
					
						<div class="line n17">17</div>
					
						<div class="line n18">18</div>
					
						<div class="line n19">19</div>
					
						<div class="line n20">20</div>
					
						<div class="line n21">21</div>
					
						<div class="line n22">22</div>
					
						<div class="line n23">23</div>
					
						<div class="line n24">24</div>
					
						<div class="line n25">25</div>
					
						<div class="line n26">26</div>
					
						<div class="line n27">27</div>
					
						<div class="line n28">28</div>
					
						<div class="line n29">29</div>
					
						<div class="line n30">30</div>
					
						<div class="line n31">31</div>
					
						<div class="line n32">32</div>
					
						<div class="line n33">33</div>
					
						<div class="line n34">34</div>
					
						<div class="line n35">35</div>
					
						<div class="line n36">36</div>
					
						<div class="line n37">37</div>
					
						<div class="line n38">38</div>
					
						<div class="line n39">39</div>
					
						<div class="line n40">40</div>
					
						<div class="line n41">41</div>
					
						<div class="line n42">42</div>
					
						<div class="line n43">43</div>
					
				</td>
				
				<td class="code">
					<pre><div class="container"><div class="line"><code><span class="doctype">&lt;!doctype html&gt;</span></code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;<span class="title">html</span> <span class="attribute">lang</span>=<span class="value">&quot;en&quot;</span>&gt;</span></code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;<span class="title">head</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">meta</span> <span class="attribute">charset</span>=<span class="value">&quot;utf-8&quot;</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">title</span>&gt;</span>accordion demo<span class="tag">&lt;/<span class="title">title</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">link</span> <span class="attribute">rel</span>=<span class="value">&quot;stylesheet&quot;</span> <span class="attribute">href</span>=<span class="value">&quot;//code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css&quot;</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">script</span> <span class="attribute">src</span>=<span class="value">&quot;//code.jquery.com/jquery-1.8.3.js&quot;</span>&gt;</span><span class="javascript"></span><span class="tag">&lt;/<span class="title">script</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">script</span> <span class="attribute">src</span>=<span class="value">&quot;//code.jquery.com/ui/1.9.2/jquery-ui.js&quot;</span>&gt;</span><span class="javascript"></span><span class="tag">&lt;/<span class="title">script</span>&gt;</span></code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;/<span class="title">head</span>&gt;</span></code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;<span class="title">body</span>&gt;</span></code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;<span class="title">div</span> <span class="attribute">id</span>=<span class="value">&quot;accordion&quot;</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">h3</span>&gt;</span>Section 1<span class="tag">&lt;/<span class="title">h3</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">div</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>    <span class="tag">&lt;<span class="title">p</span>&gt;</span>Mauris mauris ante, blandit et, ultrices a, suscipit eget.</code></div></div><div class="container"><div class="line"><code>    Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,</code></div></div><div class="container"><div class="line"><code>    condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros.</code></div></div><div class="container"><div class="line"><code>    Nam mi. Proin viverra leo ut odio.<span class="tag">&lt;/<span class="title">p</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;/<span class="title">div</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">h3</span>&gt;</span>Section 2<span class="tag">&lt;/<span class="title">h3</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">div</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>    <span class="tag">&lt;<span class="title">p</span>&gt;</span>Sed non urna. Phasellus eu ligula. Vestibulum sit amet purus.</code></div></div><div class="container"><div class="line"><code>    Vivamus hendrerit, dolor aliquet laoreet, mauris turpis velit,</code></div></div><div class="container"><div class="line"><code>    faucibus interdum tellus libero ac justo.<span class="tag">&lt;/<span class="title">p</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;/<span class="title">div</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">h3</span>&gt;</span>Section 3<span class="tag">&lt;/<span class="title">h3</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">div</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>    <span class="tag">&lt;<span class="title">p</span>&gt;</span>Nam enim risus, molestie et, porta ac, aliquam ac, risus.</code></div></div><div class="container"><div class="line"><code>    Quisque lobortis.Phasellus pellentesque purus in massa.<span class="tag">&lt;/<span class="title">p</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>    <span class="tag">&lt;<span class="title">ul</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>      <span class="tag">&lt;<span class="title">li</span>&gt;</span>List item one<span class="tag">&lt;/<span class="title">li</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>      <span class="tag">&lt;<span class="title">li</span>&gt;</span>List item two<span class="tag">&lt;/<span class="title">li</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>      <span class="tag">&lt;<span class="title">li</span>&gt;</span>List item three<span class="tag">&lt;/<span class="title">li</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>    <span class="tag">&lt;/<span class="title">ul</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;/<span class="title">div</span>&gt;</span></code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;/<span class="title">div</span>&gt;</span></code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;<span class="title">script</span>&gt;</span><span class="javascript"></span></code></div></div><div class="container"><div class="line"><code>$( <span class="string">&quot;#accordion&quot;</span> ).accordion();</code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;/<span class="title">script</span>&gt;</span></code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;/<span class="title">body</span>&gt;</span></code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;/<span class="title">html</span>&gt;</span></code></div></div></pre>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<h4>Demo:</h4>
<div class="demo code-demo" data-height="350"></div>
</div></section>
</div></article>


</body>
</html>
